-- card: 8073 from stack: in.7 -- bmap block id: 3734 -- flags: 0000 -- background id: 6834 -- name: ChptLstCrd -- part 2 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=21 top=288 right=315 bottom=88 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Quit ----- HyperTalk script ----- on mouseUp answer "Perhaps you accidently pressed Quit?" with "Yes I did" or "No I didn't" if it is "No I didn't" then domenu "Quit Hypercard" end mouseUp -- part 3 (field) -- low flags: 00 -- high flags: 2007 -- rect: left=254 top=0 right=342 bottom=512 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: ChptLstFld ----- HyperTalk script ----- on mouseup global Chapt,ChptName Put the number of lines in card field "ChptLstFld" into NumChapt if NumChapt is 0 then exit mouseup set locktext of card field "ChptLstFld" to false put item 2 of the clickloc into Ln put item 1 of the rect of card field "ChptLstFld" into Left add 6 to Left put item 3 of the rect of card field "ChptLstFld" into Right subtract 19 from Right click at Right,Ln click at Left,Ln with shiftkey if the selection is empty then beep 2 click at 0,0 set locktext of card field "ChptLstFld" to true put number of lines in card field "ChptLstFld" into LastLn repeat with x = 1 to LastLn if line x of card field "ChptLstFld" is empty then delete line x to lastLn of card field "ChptLstFld" exit repeat end if end repeat exit mouseup end if put the selection into ChptName set locktext of card field "ChptLstFld" to true repeat with x = 1 to NumChapt if the selection is line x of card field "ChptLstFld" then exit repeat end repeat put line x of card field "ChptOrdrFld" into ChaptNum put Bs10To26(ChaptNum) into Chapt visual effect zoom open slowly go to card Chapt if the result is not empty then NoTpcCrd end mouseup -- part 28 (field) -- low flags: 81 -- high flags: 0007 -- rect: left=87 top=102 right=217 bottom=150 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: ChptOrdrFld -- part 33 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=93 top=256 right=283 bottom=160 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Contents ----- HyperTalk script ----- on mouseup global Chapt repeat while true go to card "ChptLstCrd" put number of lines in card field "ChptLstFld" + 1 into ChaptNum put "Name Chapter" && ChaptNum into Prompt ask prompt if it is empty then exit mouseup put it into UsrChptNam put 1 into x repeat while true put "Name Topic" && x && "of Chapter" && ChaptNum into prompt ask prompt if it is empty then go to card "ChptLstCrd" if x > 1 then exit repeat if x is 1 then exit mouseup end if put it into UsrTpcNam if x is 1 then put UsrChptNam & return after card field "ChptLstFld" put ChaptNum & return after card field "ChptOrdrFld" put Bs10To26(ChaptNum) into Chapt set cursor to 4 set lockscreen to true put MakeCard("TpcLstTmplt") into dummy set lockscreen to false set the name of this card to Chapt set lockscreen to false end if put UsrTpcNam & return after field "TpcLstFld" set lockscreen to true set cursor to 4 put the number of lines in field "TpcLstFld" into TopicNum put TopicNum & return after field "TpcOrdrFld" put MakeCard("NtTmplt") into dummy put Chapt & TopicNum into NtCrdNam set the name of this card to NtCrdNam put UsrTpcNam into field "HeaderFld" go to card Chapt flash 2 add 1 to x set lockscreen to false end repeat end repeat end mouseup -- part 34 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=165 top=256 right=283 bottom=232 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Delete ----- HyperTalk script ----- on mouseUp put number of lines in card field "ChptLstFld" into LstChptNum if LstChptNum is 0 then exit mouseup ask "Delete which chapter?" if it is empty then exit mouseup put it into DelChoice put hilite of card button "ExactMtch" into ExactMatch set cursor to 4 repeat with LnClicked = 1 to LstChptNum if Exactmatch then if DelChoice is line LnClicked of card field "ChptLstFld" then exit repeat end if else if DelChoice is in line LnClicked of card field "ChptLstFld" then exit repeat end if end if if LnClicked is LstChptNum then beep 1 put "The name you entered is not in the list!" wait 2 seconds hide msg exit mouseup end if end repeat set lockscreen to true put line LnClicked of card field "ChptOrdrFld" into ChptOrdrNum put Bs10To26(ChptOrdrNum) into ChptName if ChptOrdrNum is LstChptNum then delete line LnClicked of card field "ChptOrdrFld" delete line LnClicked of card field "ChptLstFld" put DelCards(ChptName) into dummy else repeat with x = 1 to LstChptNum if line x of card field "ChptOrdrFld" is LstChptNum then exit repeat end repeat put ChptOrdrNum into line x of card field "ChptOrdrFld" delete line LnClicked of card field "ChptLstFld" delete line LnClicked of card field "ChptOrdrFld" put DelCards(ChptName) into dummy put Bs10To26(LstChptNum) into LstChapName go to card LstChapName set name of this card to ChptName put number of lines in field "TpcLstFld" into LstTpcNum repeat with x = 1 to LstTpcNum go to card LstChapName & x set name of this card to ChptName & x end repeat end if go to card "ChptLstCrd" set lockscreen to false flash 2 end mouseUp -- part 35 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=93 top=288 right=315 bottom=160 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Rename ----- HyperTalk script ----- on mouseUp Put number of lines in card field "ChptLstFld" into NumChapt if NumChapt is 0 then exit mouseup ask "Rename what Chapter?" if it is empty then exit mouseup put it into ChToRenam put hilite of card button "ExactMtch" into ExactMatch set cursor to 4 repeat with LnNum = 1 to NumChapt if Exactmatch then if ChToRenam is line LnNum of card field "ChptLstFld" then exit repeat end if else if ChToRenam is in line LnNum of card field "ChptLstFld" then exit repeat end if end if if LnNum is NumChapt then beep 1 put "The name you entered is not in the list!" wait 2 seconds hide msg exit mouseup end if end repeat set cursor to 1 put "Enter New Title for Chapter" into prompt ask prompt if it is empty then exit mouseup else put it into NewTitle put line LnNum of card field "ChptLstFld" into Temp put the number of chars in Temp into EndChar repeat with NonSpc = 1 to EndChar if char NonSpc of Temp is not " " then exit repeat end repeat put NewTitle into char NonSpc to EndChar of line LnNum of card field "ChptLstFld" end if flash 2 end mouseUp -- part 36 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=165 top=288 right=315 bottom=232 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Insert ----- HyperTalk script ----- on mouseUp global Chapt put number of lines in card field "ChptLstFld" into TtlNumChpts if TtlNumChpts is 0 then exit mouseup put "Name for inserted Chapter?" into prompt ask prompt if it is empty then exit mouseup put it into InsertedName put "Insert after what chapter? [none]" into prompt ask prompt if it is empty then exit mouseup put it into AfterName put hilite of card button "ExactMtch" into ExactMatch set cursor to 4 if AfterName is "none" then put 1 into ChptInsrtNum else repeat with x = 1 to TtlNumChpts if Exactmatch then if AfterName is line x of card field "ChptLstFld" then exit repeat end if else if AfterName is in line x of card field "ChptLstFld" then exit repeat end if end if if x is TtlNumChpts then beep 1 put "The name you entered is not in the list!" wait 2 seconds hide msg exit mouseup end if end repeat put x + 1 into ChptInsrtNum end if put 1 into x repeat while true put "Name Topic" && x && "of Chapter" && ChptInsrtNum into prompt ask prompt if it is empty then go to card "ChptLstCrd" exit mouseup end if put it into UsrTpcNam if x is 1 then put InsertedName & return before line ChptInsrtNum of card field "ChptLstFld" put TtlNumChpts + 1 into LstChptNum put LstChptNum & return before line ChptInsrtNum of card field "ChptOrdrFld" put Bs10To26(LstChptNum) into Chapt set cursor to 4 set lockscreen to true put MakeCard("TpcLstTmplt") into dummy set lockscreen to false set the name of this card to Chapt end if put UsrTpcNam & return after field "TpcLstFld" put the number of words in field "TpcLstFld" into TopicNum put TopicNum & return after field "TpcOrdrFld" set cursor to 4 set lockscreen to true put MakeCard("NtTmplt") into dummy put Chapt & TopicNum into NtCrdNam set the name of this card to NtCrdNam put UsrTpcNam into field "HeaderFld" go to card Chapt set lockscreen to false add 1 to x flash 2 end repeat end mouseUp -- part 37 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=21 top=256 right=283 bottom=88 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Remove All ----- HyperTalk script ----- on mouseUp answer "Delete table of contents & all graphics/text?" with "OK" or "Cancel" if it is empty then exit mouseup if it is "OK" then set cursor to 4 set lockscreen to true go to first card put false into essential repeat for number of cards get short name of this card if it is "ChptLstCrd" or it is "TpcLstTmplt" or it is "NtTmplt" or it is "Welcome" then put true into essential go to next card end if if not essential then domenu "delete card" put false into essential end repeat if the freeSize of this stack is not 0 then if the diskSpace > the size of this stack then domenu "Compact Stack" end if go to card "ChptLstCrd" put empty into card field "ChptLstFld" put empty into card field "ChptOrdrFld" set lockscreen to false hide msg flash 2 end if end mouseUp -- part 56 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=115 top=226 right=239 bottom=138 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: IndentFld -- part 59 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=138 top=225 right=241 bottom=154 -- title width / last selected line: 0 -- icon id / first selected line: 16692 / 16692 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: IncIndent ----- HyperTalk script ----- on mouseUp if card field "IndentFld" is not 12 then add 3 to card field "IndentFld" end mouseUp -- part 60 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=99 top=224 right=240 bottom=115 -- title width / last selected line: 0 -- icon id / first selected line: 3584 / 3584 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: DecIndent ----- HyperTalk script ----- on mouseUp if card field "IndentFld" is not 0 then subtract 3 from card field "IndentFld" end mouseUp -- part 61 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=165 top=224 right=251 bottom=232 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: IndentLst ----- HyperTalk script ----- on mouseUp global NumChpt,XactMtch,Xit Put number of lines in card field "ChptLstFld" into NumChpt if NumChpt is 0 then exit mouseup put hilite of button "ExactMtch" into XactMtch ask "Name first Topic to be indented" if it is empty then exit mouseup put it into fTpc put GetLnNum(fTpc,"ChptLstFld") into fLnNum if Xit then exit mouseup ask "Name last Chapter to be indented" if it is empty then exit mouseup put it into lTpc put GetLnNum(lTpc,"ChptLstFld") into lLnNum if Xit then exit mouseup put card field "IndentFld" into NumIndent put empty into Spcs repeat for NumIndent times put " " before Spcs end repeat repeat with x = fLnNum to lLnNum put line x of card field "ChptLstFld" into Temp repeat while char 1 of Temp is " " delete char 1 of Temp end repeat put Spcs before Temp put Temp into line x of card field "ChptLstFld" end repeat end mouseUp -- part 62 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=53 top=237 right=250 bottom=87 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: PartialMtch ----- HyperTalk script ----- on mouseUp set hilite of card button "ExactMtch" to false set hilite of card button "PartialMtch" to true end mouseUp -- part 63 (button) -- low flags: 00 -- high flags: 4000 -- rect: left=22 top=237 right=250 bottom=52 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ExactMtch ----- HyperTalk script ----- on mouseUp set hilite of card button "ExactMtch" to true set hilite of card button "PartialMtch" to false end mouseUp -- part 64 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=2 top=143 right=165 bottom=252 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ImportMenus ----- HyperTalk script ----- on mouseUp if number of cards > 4 then answer "First, remove all stack cards." with "OK" exit mouseup end if put short name of this stack into ToStk answer "About to transfer data between stacks…" with "Cancel" or "OK" if it is "Cancel" then exit mouseup answer "This is the ‘destination’ Summarizer stack." with "OK" answer "Choose the ‘source’ Summarizer stack …" with "OK" put FileName("STAK") into FromStk if FromStk is not empty then go to stack FromStk else exit mouseup end if set cursor to 4 put "Reading from ‘source’ Summarizer stack …" go to card "ChptLstCrd" put card field "ChptOrdrFld" into ChptOrdr put the number of lines in ChptOrdr into NumChpts put FromStk & ".update" into flName open file flName write NumChpts & "∆" to file flName write card field "ChptLstFld" & "∆" to file flName write card field "ChptOrdrFld" & "∆" to file flName repeat with x = 1 to NumChpts put line x of ChptOrdr into ChptNum put Bs10To26(ChptNum) into ChptName go to card ChptName put field "TpcOrdrFld" into TpcOrdr put the number of lines in TpcOrdr into NumTpcs write NumTpcs & "∆" to file flName write field "TpcLstFld" & "∆" to file flName write field "TpcOrdrFld" & "∆" to file flName repeat with y = 1 to NumTpcs put line y of TpcOrdr into TpcNum put Chptname & TpcNum into PgName go to card PgName if the number of card fields is 1 then write "ƒ" & card field "txtFld" & "∆" to file flName else write "Ω" to file flName end if go to next card put 0 into PgCnt put empty into Temp repeat while short name of this card is "@" if the number of card fields is 1 then put "ƒ" & card field "txtFld" & "∆" after Temp else put "Ω" after Temp end if add 1 to PgCnt go to next card end repeat if PgCnt is 0 then write "∑" to file flName else write "¥" & PgCnt & "∆" to file flName write Temp to file flName end if end repeat end repeat close file flName put "Writing to ‘destination’ Summarizer stack…" go to stack ToStk go to card "ChptLstCrd" open file flName read from file flName until "∆" delete last char of it put it into NumChpts read from file flName until "∆" delete last char of it put it into card field "ChptLstFld" read from file flName until "∆" delete last char of it put it into card field "ChptOrdrFld" put card field "ChptOrdrFld" into ChptOrdr put the number of lines in ChptOrdr into NumChpts repeat with x = 1 to NumChpts put line x of ChptOrdr into ChptNum put Bs10To26(ChptNum) into ChptName put MakeCard("TpcLstTmplt") into dummy set name of this card to ChptName read from file flName until "∆" delete last char of it put it into NumTpcs read from file flName until "∆" delete last char of it put it into field "TpcLstFld" read from file flName until "∆" delete last char of it put it into field "TpcOrdrFld" put field "TpcOrdrFld" into TpcOrdr put the number of lines in TpcOrdr into NumTpcs put field "TpcLstFld" into TpcLst repeat with y = 1 to NumTpcs put line y of TpcOrdr into TpcNum put Chptname & TpcNum into PgName put MakeCard("NtTmplt") into dummy set name of this card to PgName put line y of TpcLst into field "HeaderFld" read from file flName for 1 if it is "Ω" then else MakeField read from file flName until "∆" delete last char of it put it into card field "TxtFld" end if read from file flName for 1 if it is "∑" then else read from file flName until "∆" delete last char of it put it into PgCnt repeat PgCnt times read from file flName for 1 if it is "Ω" then MakePage else MakePage MakeField read from file flName until "∆" delete last char of it put it into card field "TxtFld" end if end repeat end if end repeat end repeat close file flName go to card "ChptLstCrd" hide msg flash 2 end mouseUp -- part contents for card part 56 ----- text ----- 0 -- part contents for card part 3 ----- text ----- Will This Stack Ever Crash? New Features Shareware Notice -- part contents for card part 28 ----- text ----- 1 2 3